﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marmat.Foundation
{
    /// <summary>
    /// 编辑窗体
    /// </summary>
    public interface IEditForm
    {
        /// <summary>
        /// 设置视图面板的路由
        /// </summary>
        /// <param name="route">路由</param>
        void SetRoute(IEditFormRoute route);

        /// <summary>
        /// 设置视图面板的控制器
        /// </summary>
        /// <param name="controller">控制器</param>
        void SetController(IEditFormController controller);

        /// <summary>
        /// 点击保存时执行,保存成功后会重新刷新数据
        /// </summary>
        bool Save();

        /// <summary>
        /// 点击保存时执行
        /// </summary>
        /// <param name="refreshData">保存成功后是否重新刷新数据。</param>
        /// <returns>返回true，则代表执行了保存操作(不代表执行成功)</returns>
        bool Save(bool refreshData);
    }
}
